package cn.goktech.client;

import cn.goktech.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Classname SearchClient
 * @Description TODO
 * @Date 2021/2/14 14:17
 * @Created by 刘岳辉
 */
@FeignClient("SEARCH") //对应模块name
public interface SearchClient {

    @RequestMapping(value = "/find",method = RequestMethod.GET)
    String find();

    @RequestMapping(value = "//findById/{id}",method = RequestMethod.GET)
    User findById(@PathVariable(value = "id") Integer id);

    @RequestMapping(value = "/getUser",method = RequestMethod.GET)
    User getUser(@RequestParam(value = "id") Integer id, @RequestParam(value = "name") String name);

    @RequestMapping(value = "/save",method = RequestMethod.GET)
    User save(@RequestBody User user);

}
